package cn.chainco.cts.iserviceImpl;

import java.util.List;

import cn.chainco.cts.idao.ICurrencyDao;
import cn.chainco.cts.idao.IDataDictionaryDao;
import cn.chainco.cts.iservice.ICurrencyManager;
import cn.chainco.cts.iservice.IDataDictionaryManager;
import cn.chainco.cts.jdo.Currency;
import cn.chainco.cts.jdo.DataDictionary;
import cn.chainco.cts.jdo.Work;
import cn.chainco.cts.utils.query.Page;
import cn.chainco.cts.utils.query.QueryOrder;
import cn.chainco.cts.utils.query.QueryParam;

public class DataDictionaryManagerImpl extends CommonManagerImpl implements IDataDictionaryManager{
	private IDataDictionaryDao dataDictionaryDao;

	public DataDictionary findDataById(int id) {
		return dataDictionaryDao.findDataById(id);
	}

	/**
	 * @param type 可为null
	 * @param typeDetail 可为null
	 * @param status 是否可用(可为null)
	 * @param orderNo 是否可用(可为null)1.asc , 2.desc
	 * @return
	 */
	public List<DataDictionary> findDataByType(Integer type, Integer typeDetail, Integer status, Integer orderNo) {
		return dataDictionaryDao.findDataByType(type, typeDetail, status, orderNo);
	}

	/**
	 * @param name 名称
	 * @param type 可为null
	 * @param typeDetail 可为null
	 * @param status 是否可用(可为null)
	 * @param orderNo 是否可用(可为null)1.asc , 2.desc
	 * @return
	 */
	
	public List<DataDictionary> findDataByType(String name , String type, String typeDetail, String status, String orderNo){
		return dataDictionaryDao.findDataByType(name, type, typeDetail, status, orderNo);
	}
	
	
	
	public IDataDictionaryDao getDataDictionaryDao() {
		return dataDictionaryDao;
	}

	public void setDataDictionaryDao(IDataDictionaryDao dataDictionaryDao) {
		this.dataDictionaryDao = dataDictionaryDao;
	}
	
	/**
	 * 查找数据字典是否被订单引用
	 * @param id
	 * @return
	 */
	public List<Work> findWorkByDicId(Long id){
		return dataDictionaryDao.findWorkByDicId(id);
	}

}
